import {handleActions} from 'redux-actions';
import initialState from '../inits/settings';
import {
  SET_AUTHOR,
  SET_COMPANY
} from '../../constants';

export default handleActions({

  [SET_AUTHOR]: (state, action) => Object.assign({}, state, {author: action.payload.author}),

  [SET_COMPANY]: (state, action) => Object.assign({}, state, {company: action.payload.company})

}, initialState);
